/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.chapter5.designpatters.creationpatterns.factory;

import za.ac.cput.chapter5.designpatters.creationpatterns.factorymethod.factorymethodimplementation.Cat;
import za.ac.cput.chapter5.designpatters.creationpatterns.factorymethod.factorymethodimplementation.Dog;
import za.ac.cput.chapter5.designpatters.creationpatterns.factorymethod.factorymethodinterface.Animal;



/**
 *
 * @author Sakhe
 */
public class factory
{

    public Animal getAnimal (String type) {
    if("canine".equals(type)) {
    return new Dog() ;
    } else {
    return new Cat();
    }
}
}
